<template>
  <div>
    <u-navbar
      :title="title"
      bgColor="transparent"
      :fixed="false"
      :autoBack="true"
    >
    </u-navbar>
    <p style="padding: 20px" v-html="content"></p>
  </div>
</template>
<script>
export default {
  data() {
    return {
      content: "",
      title: "",
      privacyMap: {
        agreement: "用户协议",
        payagreement: "手机充值服务协议",
        teen_private: "未成年人保护条",
        privacy: "隐私协议",
        about_private:'关于我们'
      },
    };
  },
  onLoad(option) {
    this.popContent = uni.getStorageSync("txt");
    this.content = this.popContent[option.key];
    this.title = this.privacyMap[option.key];
  },
  methods: {
    unescapeHTML(htmlString) {
      const txt = document.createElement("textarea");
      txt.innerHTML = htmlString;
      return txt.value;
    },
  },
};
</script>
